//package com.hk.jmm.adpater;
//
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.TextView;
//
//import androidx.annotation.NonNull;
//
//import com.hk.jmm.R;
//import com.hk.jmm.db.WorkWarring;
//import com.skyz.wrap.adapter.WrapAdapter;
//
//import org.jetbrains.annotations.NotNull;
//
//public class WorkWarinAdapter extends WrapAdapter<WorkWarring, WorkWarinAdapter.ViewHolder> {
//    @Override
//    protected int getNoDataLayoutId() {
//        return 0;
//    }
//    @Override
//    protected ViewHolder onBaseCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
//        View view = LayoutInflater.from(mContext).inflate(R.layout.layout_work_warin, parent,
//                false);
//        return new ViewHolder(view);
//    }
//
//    @Override
//    protected void onBaseBindViewHolder(ViewHolder viewHolder, WorkWarring item) {
//        viewHolder.tab_warning_type.setText(filterNull(item.getWarningType()));
//        viewHolder.tab_service_call.setText(filterNull(item.getServiceCallWarningReferenceId()));
//        viewHolder.tab_action.setText(filterNull(item.getAction()));
//        viewHolder.tab_reason.setText(filterNull(item.getReasonCode()));
//        viewHolder.tab_description.setText(filterNull(item.getDescription()));
//    }
//
//    public static class ViewHolder extends BaseViewHolder {
//        private final TextView tab_warning_type;
//        private final TextView tab_service_call;
//        private final TextView tab_action;
//        private final TextView tab_reason;
//        private final TextView tab_description;
//
//        public ViewHolder(@NonNull @NotNull View itemView) {
//            super(itemView);
//            tab_warning_type = itemView.findViewById(R.id.tab_warning_type);
//            tab_service_call = itemView.findViewById(R.id.tab_service_call);
//            tab_action= itemView.findViewById(R.id.tab_action);
//            tab_reason= itemView.findViewById(R.id.tab_reason);
//            tab_description= itemView.findViewById(R.id.tab_description);
//        }
//    }
//
//    private String filterNull(Object str) {
//        return str == null ? "" : String.valueOf(str);
//    }
//}
